home *** CD-ROM | disk | FTP | other *** search
/ PC World 1999 April / PCWorld_1999-04_cd.bin / Software / Vyzkuste / LearnVB5 / VB Code / Class 1 / Exercise1.frm (.txt) < prev    next >
Visual Basic Form  |  1998-03-27  |  4KB  |  126 lines

  1. VERSION 5.00
  2. Begin VB.Form frmCalendar 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "My Calendar"
  5.    ClientHeight    =   2865
  6.    ClientLeft      =   2295
  7.    ClientTop       =   1650
  8.    ClientWidth     =   5790
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   2865
  14.    ScaleWidth      =   5790
  15.    Begin VB.Timer timDisplay 
  16.       Interval        =   1000
  17.       Left            =   240
  18.       Top             =   2160
  19.    End
  20.    Begin VB.Label lblTime 
  21.       Caption         =   "00:00:00 PM"
  22.       BeginProperty Font 
  23.          Name            =   "Times New Roman"
  24.          Size            =   24
  25.          Charset         =   0
  26.          Weight          =   700
  27.          Underline       =   0   'False
  28.          Italic          =   0   'False
  29.          Strikethrough   =   0   'False
  30.       EndProperty
  31.       Height          =   735
  32.       Left            =   120
  33.       TabIndex        =   4
  34.       Top             =   720
  35.       Width           =   3375
  36.    End
  37.    Begin VB.Label lblNumber 
  38.       Alignment       =   2  'Center
  39.       Caption         =   "31"
  40.       BeginProperty Font 
  41.          Name            =   "Arial"
  42.          Size            =   72
  43.          Charset         =   0
  44.          Weight          =   700
  45.          Underline       =   0   'False
  46.          Italic          =   0   'False
  47.          Strikethrough   =   0   'False
  48.       EndProperty
  49.       Height          =   1575
  50.       Left            =   2640
  51.       TabIndex        =   3
  52.       Top             =   480
  53.       Width           =   3135
  54.    End
  55.    Begin VB.Label lblYear 
  56.       Alignment       =   2  'Center
  57.       Caption         =   "1998"
  58.       BeginProperty Font 
  59.          Name            =   "Times New Roman"
  60.          Size            =   24
  61.          Charset         =   0
  62.          Weight          =   700
  63.          Underline       =   0   'False
  64.          Italic          =   0   'False
  65.          Strikethrough   =   0   'False
  66.       EndProperty
  67.       Height          =   495
  68.       Left            =   2520
  69.       TabIndex        =   2
  70.       Top             =   2040
  71.       Width           =   3255
  72.    End
  73.    Begin VB.Label lblDay 
  74.       Caption         =   "Sunday"
  75.       BeginProperty Font 
  76.          Name            =   "Times New Roman"
  77.          Size            =   24
  78.          Charset         =   0
  79.          Weight          =   700
  80.          Underline       =   0   'False
  81.          Italic          =   0   'False
  82.          Strikethrough   =   0   'False
  83.       EndProperty
  84.       Height          =   615
  85.       Left            =   120
  86.       TabIndex        =   1
  87.       Top             =   0
  88.       Width           =   2895
  89.    End
  90.    Begin VB.Label lblMonth 
  91.       Alignment       =   2  'Center
  92.       Appearance      =   0  'Flat
  93.       BackColor       =   &H00C0C0C0&
  94.       Caption         =   "March"
  95.       BeginProperty Font 
  96.          Name            =   "Times New Roman"
  97.          Size            =   24
  98.          Charset         =   0
  99.          Weight          =   700
  100.          Underline       =   0   'False
  101.          Italic          =   0   'False
  102.          Strikethrough   =   0   'False
  103.       EndProperty
  104.       ForeColor       =   &H80000008&
  105.       Height          =   735
  106.       Left            =   2520
  107.       TabIndex        =   0
  108.       Top             =   0
  109.       Width           =   3255
  110.    End
  111. Attribute VB_Name = "frmCalendar"
  112. Attribute VB_GlobalNameSpace = False
  113. Attribute VB_Creatable = False
  114. Attribute VB_PredeclaredId = True
  115. Attribute VB_Exposed = False
  116. Option Explicit
  117. Private Sub timDisplay_Timer()
  118. Dim Today As Variant
  119. Today = Now
  120. lblDay.Caption = Format(Today, "dddd")
  121. lblMonth.Caption = Format(Today, "mmmm")
  122. lblYear.Caption = Format(Today, "yyyy")
  123. lblNumber.Caption = Format(Today, "d")
  124. lblTime.Caption = Format(Today, "h:mm:ss ampm")
  125. End Sub
  126.